package ua.org.mtgatherer.entities;

import com.google.appengine.api.datastore.Key;
import java.util.Date;
import javax.jdo.annotations.*;

/**
 *
 * @author esed
 */
@PersistenceCapable
public class TcgPlayerDeck
{
   @PrimaryKey
   @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
   private Key id;
   
   @Persistent
   private String owner;
   
   @Persistent
   private Date dateAdded = new Date();
   
   @Persistent
   private DeckType deckTypeOnAddDate = DeckType.STANDART;
   
   @Persistent
   private String deckNumber;
   
   @Persistent
   private String title;
   
   @Persistent
   private Deck deck = new Deck();

   public Date getDateAdded()
   {
      return dateAdded;
   }

   public void setDateAdded(Date dateAdded)
   {
      this.dateAdded = dateAdded;
   }

   public DeckType getDeckTypeOnAddDate()
   {
      return deckTypeOnAddDate;
   }

   public void setDeckTypeOnAddDate(DeckType deckTypeOnAddDate)
   {
      this.deckTypeOnAddDate = deckTypeOnAddDate;
   }

   public String getOwner()
   {
      return owner;
   }

   public void setOwner(String owner)
   {
      this.owner = owner;
   }

   @Override
   public String toString()
   {
      return owner + "\n" + dateAdded + "\n" + deckTypeOnAddDate + "\n" + super.toString();
   }

   public String getDeckNumber() {
      return deckNumber;
   }

   public void setDeckNumber(String deckNumber) {
      this.deckNumber = deckNumber;
   }

   public Deck getDeck() {
      return deck;
   }

   public void setDeck(Deck deck) {
      this.deck = deck;
   }

   public String getTitle() {
      return title;
   }

   public void setTitle(String title) {
      this.title = title;
   }
}
